<!DOCTYPE html>
<html>
  <head>
  	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="format-detection" content="telephone=no">
	<title>${arti.title} - ${cms_sitetitle}</title>
	<meta name="keywords" content="${cms_keywords}" />
    <meta name="description" content="${cms_descinfo}" />
	<link rel="stylesheet" type="text/css"  href="/css/swiper.min.css">
    <link rel="stylesheet" type="text/css"  href="/css/css.css"/>
  </head>
  <script>
    document.getElementsByTagName('html')[0].style.fontSize = document.documentElement.clientWidth/7.5 + 'px'
    window.onresize = function() {
        document.getElementsByTagName('html')[0].style.fontSize = document.documentElement.clientWidth/7.5 + 'px'
    }
</script>
  <body>
	@include("/header.html",{"topcode":topcode,"activeclass":"cur"}){}

	<div class="location">
		<div class="loactionCont">
			<div class="locationInfor">
				当前位置:<a href="">首页</a>
				@for(p in positions){
					<span>&gt;</span>
					<a href="${p.url}">${p.name}</a>
			   @}
			</div>
			<!-- <div class="tabName">
				<#cms_channels pcode="${topcode}" ;channels>
				@for(channel in channels){
					@if(channel.code == code ){
						<a href="${channel.url}" class="cur">
					@}else{
						<a href="${channel.url}">
					@}
					${channel.name}</a>
				@}
			</#cms_channels>
			</div> -->
		</div>
	</div>
	<div class="aboutArticle">
		<h2>${arti.title} </h2>
		<h3 style="text-align: center;">发布时间：${arti.pubdate,"yyyy-MM-dd"}  发布人：${arti.author}</h3>
		<p>${arti.contents}</p>
		<p>附件下载：</p>
		<p class="aboutArticleP">
		<div style="display: none;" id="content-about-article">${arti.file}</div></p>
	</div>
	<script>
		const content = document.getElementById('content-about-article').innerText.replace('[{', '').replace('}]', '')
		const aboutArticleP = document.querySelector('.aboutArticleP')
		const sc = content.split('}, {')
		sc.forEach(item => {
			const a = document.createElement('a')
			a.innerHTML = item.split(',').shift().split('=').pop()
			a.download = a.innerHTML
			a.href = item.split('=').pop()
			a.style.display = 'block'
			aboutArticleP.appendChild(a)
		})
	</script>
	@include("/footer.html"){}

  </body>
  <script src="/js/swiper.min.js"></script>
  <script type="text/javascript" src="/js/jquery-2.1.4.js"></script>
  <script>
	var swiperBanner = new Swiper(".banner .mySwiper", {
		pagination: {
		  el: ".banner .swiper-pagination",
		  clickable:true,
		},
		loop:true,
		autoplay:true,
	  });
	//新闻切换
	  $('.newsHd span').click(function(){
	  	$(this).addClass('cur').siblings().removeClass('cur');
	  	var num = $(this).index();
	  	$('.newsBd .newsSlide').eq(num).fadeIn().siblings().hide();
	  })
	  
	  $(function(){
		  var windowScreen = $(window).width();
		  if(windowScreen>1280){
		  	var swiperthingHd = new Swiper('.thingHd .swiper-container', {
				slidesPerView: 17,
				spaceBetween: 30,
				centeredSlides: true,
				on: {
					slideChangeTransitionStart: function(){
					  var num = this.activeIndex;
					  $('.thingBd .thingSlide').eq(num).fadeIn().siblings().hide();
					},
				  },
		  	});
		  }else if(windowScreen<1280&&windowScreen>750) {
		  	var swiperthingHd = new Swiper('.thingHd .swiper-container', {
		  		slidesPerView:8,
		  		spaceBetween:20,
		  		centeredSlides: true,
		  		on: {
		  			slideChangeTransitionStart: function(){
		  			  var num = this.activeIndex;
		  			  $('.thingBd .thingSlide').eq(num).fadeIn().siblings().hide();
		  			},
		  		  },
		  	});
		  }else{
			 var swiperthingHd = new Swiper('.thingHd .swiper-container', {
			 	slidesPerView:3,
			 	spaceBetween:0,
			 	centeredSlides: true,
			 	on: {
			 		slideChangeTransitionStart: function(){
			 		  var num = this.activeIndex;
			 		  $('.thingBd .thingSlide').eq(num).fadeIn().siblings().hide();
			 		},
			 	  },
			 }); 
		  }
	  })
	  //搜索
	  $('.headerSearch span').click(function(){
	  	$(this).siblings('.searchSub').fadeToggle();
	  })
	  $(".searchBtn").click(function(){
		console.log($("#searchTextInput").val());
		var searchTextInput =$("#searchTextInput").val();
		if(searchTextInput){
			window.location.href="/page/search?name="+searchTextInput+"&pagesize=1&pageindex=1";
		}
	})
	  $('.menu').click(function(){
	  	if($(this).hasClass('on')){
	  		$(this).removeClass('on');
	  		$('#screen').fadeOut();
	  		$('.nav').animate({'left':'-110%'},500)
	  	}else{
	  		$(this).addClass('on');
	  		$('#screen').fadeIn();
	  		$('.nav').animate({'left':'0'},500)
	  	}
	  })
	  $('#screen').click(function(){
	  	$('.menu').removeClass('on');
	  	$('#screen').fadeOut();
	  	$('.nav').animate({'left':'-110%'},500)
	  })
  </script>
</html>
